#pragma once

#include "pch.h"
#include <string>
#include <iostream>
#include <fstream>
#include <clocale>
#include <locale>
#include <codecvt>

namespace solver
{
	class file_data
	{
		std::string file_name;
		std::string converted_str;
		int length;

	public:

		file_data() 
		{

		}

		file_data(Platform::String^ str) 
		{
			auto wdata = str->Data(); 
			using convert_type = std::codecvt_utf8<wchar_t>;
			std::wstring_convert<convert_type, wchar_t> converter;
			converted_str = converter.to_bytes(wdata);
			length = converted_str.size();
		}

		virtual ~file_data()
		{
		}

		const char *get_data()
		{
			return converted_str.c_str();
		}

		int get_data_length()
		{
			return length;
		}

		const std::string& get_file_name()
		{
			return file_name;
		}

	};

}
